---
output:
  pdf_document: default
---
# Replication Data for: The Polarization of Inequality Perceptions in the New Gilded Age

This document details all the scripts analyses necessary to replicate our findings. We have listed the scripts in the order in which they should be run. We include both instructions on how to replicate our analyses from "scratch," where there researchers will need to directly download the raw data. We also have intermediary files which researchers can use to replicate our analyses without accessing the raw data directly. 

## Code

In this section we detail our code scripts necessary for replicating our analyses. For each script we note the name of the script and whether we provide intermediary files or replicators would need to download data to run the analyses. Instructions on how to download data are included in the data sources section below. 

### Harris Code

For replicators wishing to replicate our analysis "from scratch" we have provided them with individual code scripts for each Harris data set. We have saved the code scripts in the folders as they would be downloaded from the Harris Center database, although we have removed the actual data. We include instructions below on how to download the data files. These folders and scripts are included in the "Harris\_Data" subfolder. Replicators wishing to replicate the cleaning of these individual Harris Data files should place each code script into the corresponding data folder downloaded from the UNC Harris Dataverse. Replicators should also take care to maintain the same filestructure (top level replication folder -> Harris_Data -> Individual study folders). 

### Main Code

1. 01\_merge\_files.R. This code script merges the individual Harris survey files with the 1987-2012 Pew file. 
2. 02\_create\_datasets.R. This code script prepares the merged data file for analysis and calculates missingness statistics.
3. 03\_analysis\_full\_data.R. This code script creates the tables and figures for expected values part of the main over time analysis.  
4. 04\_analysis\_counterfactual.R. This code script creates all tables and figures for the counterfactual analysis. 
5. 05\_analysis\_MSA\_ev.R. This code script creates all tables and figures for the MSA local inequality subset analysis. 
6. 06\_analysis\_sensitivity.R. This code includes all sensitivity checks and auxiliary analysis other than the ISSP analysis. 
7. 07\_issp.R. This code includes the code for the ISSP alternative outcome analysis. 
8. 08\_manifestos.R: This includes the code for analyzing data from the Comparative Manifestos project. 

## Data Sources 

In this section we describe how replicators can directly access the data necessary to replicate all analyses.

### Harris Data

We downloaded the survey data files directly from the Louis Harris Data Center Database (https://dataverse.unc.edu/dataverse/harris) which included our main survey item of interest (does the rich get richer). For each file we created an individual R script to clean and standardize that file. The R scripts we used to replicate these files are saved in the individual folders for each study (all saved in the "Harris\_Data" folder). Researchers can identify these data files in the Harris Data Center Database by searching for "rich get richer" in the "variable label" search field (in the advanced search tab). There are sixty-one surveys in total which asked this question. 

We exclude from analysis surveys surveys 7783 and 7780, as they used the "rich get richer"" description to ask a different question than out main survey item of interest "do you think the rich get richer." We only include studies including a cross-section intended to be representative of the U.S. national population. We exclude surveys which target a specific geographical region (studies 1908, 1925, 2624-N, 2624) or a specific sub-population (the leader sample of 2343, the educator, employer, veterans samples of 792801). A few of the surveys oversample on U.S. sub-populations, including surveys targeted at being representative of U.S. likely voters (P3849, 2624S/L, 2624A-1), surveys oversampling Democrats (802114), union members (7688), and racial groups (S2829, 7683). In our visuals aiming to reflect population estimates of our outcome variables we correct for these oversamples with post-stratification weights by year. 

### Pew Data

We downloaded the merged 1987-2012 Pew Research Center Values Survey directly from the Roper Center Archives (https://ropercenter.cornell.edu/ipoll/study/31096137). Replicators should download the SPSS file (p2012valmar.por) and save it in the "data\_files" folder. 

### ISSP Data

We downloaded the supplementary ISSP data directly from the 
GESIS site. We include below the links to the individual data
sets we downloaded. Replicators should download the dta
files for each dataset and save them in the relevant year
subfolder in the "ISSP\_data" subfolder. We have also saved in these files the codebooks downloaded from GESIS for reference.

- 1987: https://search.gesis.org/research_data/ZA1680
- 1992: https://search.gesis.org/research_data/ZA2310
- 1999: https://search.gesis.org/research_data/ZA3430
- 2009: https://search.gesis.org/research_data/ZA5400
- 2019: https://search.gesis.org/research_data/ZA7600

### MSA Data 

We merged in the MSA-level inequality and income segregation variables for the PEW data in a separate series of code scripts. We provide an intermediary data file "May\_21\_2025\_LocalPew\_GEO\_AllYears.csv" which includes these MSA-level inequality and income segregation files merged with Pew. We do not supply in this public facing replication package the code to replicate the merging code which created this dataset, as one of the underlying geographic datasets from the American Communities Structure has changed in structure. For replicators wishing to replicate this data merge we provide a separate replication package and the raw data upon request. 

### Other Data 

We also included a series of auxiliary data sources in our analyses. We have listed below here each of these data sources and where researchers can download the files:

1. United States state level gini and top income share datasets. These datasets ("Frank\_WID\_2015.dta", 
"Frank\_Gini\_2015.dta") can be downloaded directly from Mark Frank's website: https://profiles.shsu.edu/eco_mwf/inequality.html. Researchers should download the excel file for the annual top income shares and the excel file for the other measures measures of income inequality. 
2. U.S. census income quintiles over time. We formatted this data after downloading it from this link ("data\_files/census\_income\_quintiles.xlsx"). We have provided the formatted data for ease of replication, but the raw data is available at this link:  https://census.gov/data/tables/time-series/demo/income-poverty/historical-income-households.html.
3. U.S. wealth inequality. These data can be downloaded directly from the World Inequality Database: https://wid.world/country/usa/. Go to the wealth inequality USA table, click "top 10% share" only in the left side panel, and then download the data by clicking on the data icon on the right hand side. Save the generated data file as "wid\_data.csv" in the "data\_files" folder. 
4.  CPS Microdata for post-stratification weights. These data (counts by age, gender, education, and year) can be downloaded directly from IPUMS: https://cps.ipums.org/cps/. We include the formatted data we downloaded from CPS ("data\_files/CPS\_tables\_formatted\_12\_3.xlsx"), but replicators can download the raw data themselves at the above link.
5. ANES data for sample comparison ("data\_files/anes\_timeseries\_cdf\_stata\_20220916.dta"). These data can be directly downloaded from the ANES website: https://electionstudies.org/data-center/anes-time-series-cumulative-data-file/.
6. Comparative Manifestos Project data. Download this dataset from https://manifesto-project.wzb.eu/datasets. Download the Manifesto Project Dataset (version 2024a), xlsx version, and save in the "data\_files" folder as "data\_files/MPDataset\_MPDS2024a".
7. Estimates for CEO pay over time from Economic Policy institute . We provide a formatted version of this data set ("data\_files/Share of Management and Professional Employment 1992\_2019.xlsx"), but replicators can download the data directly from the source with this link: https://www.epi.org/publication/ceo-pay-in-2021/.

